-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routes helpers available inside ArraySerializer #336
Conversation
I think it's useful addition and it's quite common to use url helpers in API apps. Your implementation looks good after quick review, however I think it might be relevant after @spastorino's rewrite. Still, I think we should add this at some point. |
Something like this will be added for 0.9 for sure. JSONAPI url based style needs something like that. |
Nice guys! Thanks. |
Important side-note here, ActiveModel::Serializers does not depend on Rails. Rails-specific code should go in the Railtie. For url-style JSONAPI we should have some isolation so non-rails frameworks can implement support for generating the URL of an object, or the URL template of a model. |
What's the status on this? Would love url helpers in this gem. |
Status is I have a big announcement about the future of AMS, but have been a few days late in delivering it. Soon. Sorry. :/ |
ActiveModel::Serializers is being rewritten in Rust? ;) From a random developer, thanks for all the hard and great work you've done Steve. You've made my professional life much easier :). Whatever it is you decide to do, I wish you luck and success in that endeavor. |
Nothing that extreme :) And you're welcome. ❤️ |
@steveklabnik sorry to pester you, I'm just eager to hear what your big announcement is :) |
Writing it up right now. Check the rails-api-core mailing list shortly. |
Said announcement: https://groups.google.com/forum/#!topic/rails-api-core/8zu1xjIOTAM @lucasfais , I'm interested in merging this pull request, but it is out of date. Could you rebase it, please? |
It's been a month, and no rebase. I'm still interested in pulling this in, please re-submit to the |
I'm trying to do something like this:
So I need to use the route helper
tasks_url
.I'm not sure what is the best way to implement that, but here is my suggestion.